<?php 
    if(isset($data)){
        $count = 1;
        $newRow = true;
        foreach($data as $row){
            if($newRow == true)
            {
                echo '<div class="row">';
                $newRow = false;
            }
            ?>
                <div class="col-sm-4 col-md-4">
                    <a href="<?php echo base_url();?>esquire/<?php echo $row['url']; ?>/<?php echo $row['id']; ?>" class="fix-image" title="<?php echo $row['title']; ?>">
                        <img  alt="<?php echo $row['title']; ?>" src="//i.ytimg.com/vi/<?php echo $row['code']; ?>/mqdefault.jpg" class="pull-left"/>
                        <?php echo $row['title']; ?>
                    </a>                 
                </div>        
            <?php
            if($count % 3 == 0){
                echo '</div>';
                $newRow = true;
            }
            $count ++;     
        }
        echo "<ul class='pagination'>";
            echo $this->pagination->create_links(); // t?o link phân trang 
        echo "</ul>";
        ?>
        <script type="text/javascript" charset="UTF-8" src="http://cdn.adnexus.vn/scripts/onlinegame/5447d2619c9d3e12093c162b.js"></script>                        
        <?php
    }else{
        echo "N?i dung dang du?c c?p nh?t...";
    }
?>